package com.mapper;

import com.entity.School;
import com.entity.SchoolCampus;
import org.apache.ibatis.annotations.Param;

import java.util.List;


// 评论 Mapper 接口
public interface CampusMapper {
    /**插入校区*/
    Integer insertCampus(SchoolCampus campus);
    /**校区分页*/
    List<SchoolCampus> queryCampus(@Param("page") Integer page, @Param("count") Integer count, @Param("campusName") String campusName);
    /**查询校区*/
    List<SchoolCampus> lookCampus(SchoolCampus campus);
    /**删除校区*/
    Integer deleteCampus(Integer id);
    // 根据学校id删除校区
    Integer deleteCampusBySchoolId(Integer id);
    /**修改校区*/
    Integer changeCampus(SchoolCampus campus);
    /**统计校区总数*/
    Integer queryAllCampusCount(@Param("campusName") String campusName);

    /**获取schoolid对应学校的所有校区*/
    List<SchoolCampus> getSchoolCampusList(@Param("schoolId") Integer schoolId);
}
